#include <iostream>

using namespace std;

template <class T>
T sum(T t){
    return t;
}

template <class T,class ...Args>
T sum(T t,Args ...args){
    return t+sum(args...);
}

void test(){
    cout << sum(1,2,3,4,5) << endl;
    cout << sum(10.1,10.5,20.3,40.6,54.3) << endl;
}

int main()
{
    test();
    return 0;
}

